// JavaScript Document

function checkTopicGroupForm()
{
    with (window.document.frmTopicGroup) {
		if (isEmpty(txtTenndt, 'Nhập tên nhóm đề tài')) {
			return;
		} else if (isEmpty(txtDonvi, 'Nhập mã đơn vị')) {
			return;
		} else {
			submit();
		}
	}
}

function addTopicGroup(mandt)
{
	targetUrl = 'index.php?view=add';
	/*if (parentId != 0) {
		targetUrl += '&parentId=' + parentId;
	}*/
	
	window.location.href = targetUrl;
}


function modifyTopicGroup(mandt)
{
	//alert(mandt);
	window.location.href = 'index.php?view=modify&mandt=' + mandt;
}

function deleteTopicGroup(mandt)
{
	if (confirm('Deleting TopicGroup will also delete all TopicGroup in it.\nContinue anyway?')) {
		window.location.href = 'processTopicGroup.php?action=delete&mandt=' + mandt;
	}
}
/*
function deleteImage(catId)
{
	if (confirm('Delete this image?')) {
		window.location.href = 'processTopicGroup.php?action=deleteImage&catId=' + catId;
	}
}*/